﻿@using Orchard.ContentManagement
@using Orchard.Azure.MediaServices.Models

@model Orchard.Azure.MediaServices.ViewModels.Tasks.EncodeViewModel

@{
    var settings = WorkContext.CurrentSite.As<CloudMediaSettingsPart>();
}

<fieldset>
    @if (settings.WamsEncodingPresets.Any()) {
        <div class="form-requiredUploads">
            <label>@T("Encoding preset")</label>
            @Html.DropDownListFor(m => m.SelectedEncodingPreset, new SelectList(Model.EncodingPresets))
            @Html.ValidationMessageFor(m => m.SelectedEncodingPreset)
        </div>
        if (settings.EnableDynamicPackaging) {
            <p class="hint">
                NOTE: Dynamic packaging is enabled in the Microsoft Azure Media settings. To enable dynamic packaging for the output video asset, you must use one of the H264-based encoding presets.
            </p>
        }
    }
    else {
        <p>
            An encoding task cannot be executed because there are no configured encoding presets.
        </p>
    }
</fieldset>

